Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Using the Query Builder
You can easily customize this default data retrieval by using a tool called the Query Builder, where you can define a
WHEREclause and other elements of a query much as you defined theFOR EACHstatement in Chapter 2, " Using Basic 4GL Constructs."
![]()
To bring up the Query Builder for the CustQuery frame:
- Double-click on the frame background. Alternatively, select the Object Properties button from the toolbar:
![]()
The property sheet for the frame appears, where you can define various frame properties:
![]()
- Click the Query button to bring up the Query Builder.
- To define a
WHEREclause ofState = “NH”, select the Where radio set button from the set of options at the top of the Query Builder.- Select State from the list of Customer fields:
![]()
- Click the equal sign button
.
This brings up the Enter Constant dialog box where you can enter the State value NH. The Query Builder provides the quotation marks for you:
![]()
- Click OK to return to the Query Builder.
- To add a sort clause
BY Cityto your query, select the Sort radio set button.- Select the City field by double-clicking on it or by selecting it and clicking the Add>> button:
![]()
- Click OK to leave the Query Builder.
- Click OK again to leave the frame’s property sheet.
- Run your window again.
The first Customer is displayed again, but this time it is the first Customer in the State of New Hampshire, sorted by City:
![]()
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |